package com.config;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @author 惊云
 * @date 2024/1/13 17:05
 */
//@Component
//@Aspect
public class FeginAop {

    public FeginAop(){
        System.out.println("FeginAop初始化");
    }

    @Around("point()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
        Object aThis = joinPoint.getThis();

        Object proceed = joinPoint.proceed();

        return proceed;
    }

    @Pointcut("execution(* com.ssk.fegin.*.*(..))")
    public void point(){
    }

    @Pointcut("@annotation(org.springframework.stereotype.Service)")
    public void pointAnno(){
    }

}
